package com.heima.kafka.listener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class HelloListener {

    @KafkaListener(topics = "user-topic1")
    public void onMessage(String message){
//        if(!StringUtils.isEmpty(message)){
//            User user = JSON.parseObject(message, User.class);
//            System.out.println(user);
//        }

        System.out.println(message);
    }
}
